<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>添加内容</title>
	<hdjs />
	<script type="text/javascript">
		$(function(){
			$('form').validate({
				{$validate}	
			})
		})
	</script>

	<js file='__PUBLIC__/Js/mod.article.js' />
	<css file="__PUBLIC__/Css/mod.welcome.css" />
	<css file="__PUBLIC__/Css/mod.base.css" />
</head>
<body>
	
	<form action="" method="post" enctype='multipart/form-data'>
		<div class="wrap">
			<div class="title-header"><span>{$cname}</span>添加内容</div>
			<div class="menu_list">
				<ul>
					<if condition="$catType neq 4">
					<li>
						<a href="{:U('Article/index',array('cid'=>$_GET["cid"]))}" >
							内容列表
						</a>
					</li>
					</if>
					<li>
						<a href="javascript:;" class="action">
							添加内容
						</a>
					</li>
				</ul>
			</div>

			<div class="tab">
				<ul class="tab_menu">
					<li lab='base'><a href="#">基本配置</a></li>
					<li lab='pic'><a href="#">图集上传</a></li>
				</ul>
				<div class="tab_content">
					<div id='base'>
			<table class='hd-form table2'>
				<tbody>
					
					<tr>
						<td class="w100">栏目分类</td>
						<td>
							<if condition="$catType neq 4">
							<select name="category_cid" >
								<option value="0">请选择分类</option>
								<option value="{$topid}" <if condition="$topid eq $_GET['cid']">selected='selected'</if>>{$topname}</option>
								<foreach name='category' item='v'>
									<option <if condition="$v['cid'] eq $_GET['cid']">selected='selected'</if> {$v.disabled} value="{$v.cid}">---{$v._html}{$v.cname}</option>
								</foreach>
							</select>
							<else/>
							{$cname}
							<input type="hidden" name="category_cid" value="{$cid}" />
							</if>
						</td>
					</tr>
				
					<tr>
						<td class="w100">标题</td>
						<td>
							<input type="text" name="article_title"  class='w350 title'/>
						</td>
					</tr>
					

					<tr>
						<td>关键字</td>
						<td>
							<textarea name="keywords" class='w500 h100'></textarea>
						</td>
					</tr>
					
	

					<tr>
						<td>描述</td>
						<td>
							<textarea name="description" class='w500 h100'></textarea>
						</td>
					</tr>

					

				

					<tr>
						<td>排序</td>
						<td>
							<input name="sort" type="text" class='w200' value="100" />
						</td>
					</tr>
					<tr>
						<td>次数</td>
						<td>
							<input name="click" type="text" class='w200' value="100" />
						</td>
					</tr>
					<tr>
						<td>发布时间</td>
						<td>
							<input name="addtime" id='addtime' type="text" class='w200' />
							<script>
								$('#addtime').calendar({
									format : 'yyyy-MM-dd'
								});
							</script>
						</td>
					</tr>
					<tr>
						<td>审核</td>
						<td>
							<label >
								<input name="verifystate" type="radio"  value="1" /> 审核中
							</label>
							<label >
								<input checked="checked" name="verifystate" type="radio" value="2" /> 通过
							</label>
						</td>
					</tr>
					<tr>
						<td>属性</td>
						<td>
							<foreach name='flag' item='v'>
							<label >
								<input name="flag[]" type="checkbox"  value="{$v}" /> {$v}({$key})
							</label>
							</foreach>
						</td>
					</tr>
					<tr>
						<td>图片</td>
						<td>
							<input type="file" name='pic'/>
						</td>
					</tr>
					<tr >
						<td>文件</td>
						<td>
							<input type="file" name='file'/>
						</td>
					</tr>
				
					<foreach name='extForm' item='v'>
					<tr>
						<td>{$v.title}</td>
						<td>{$v.html}</td>
					</tr>
					</foreach>
					<if condition="$attrForm">
					<tr>
						<th align='left' colspan='2'>筛选</th>
					</tr>
					<foreach name='attrForm' item='v'>
					<tr>
						<td>{$v.title}</td>
						<td>{$v.html}</td>
					</tr>
					</foreach>
					</if>
				</tbody>
			</table>
			</div>
					<div id='pic'>
						<if condition='!$attrPicCount'>
						<table class='table2 hd-form'>
							<tbody>
								<tr>
									<td width="20"><span class='hand' onclick='add_pic(this)'>[+]</span></td>
									<td ><input type="file" name="img[]" class="input noborder" /></td>
									<td style='display:none'><input type="text" name="pic_title[]" class="input" /></td>
								</tr>

							</tbody>
						</table>
						<else />
							<div class="color">
								
							
									<!-- <ul class="color_menu">
										<li lab='attr1' ><a href="#" >红色</a></li>
										<li lab='attr2'><a href="#">黄色</a></li>
									</ul>
									
									<div class="color_content">
										
										<div id='attr1'>
											<table class='table2 hd-form'>
												<tr>
													<td width="20"><span class='hand' onclick='add_pic(this)'>[+]</span></td>
													<td width="50"><input type="file" name="img1[]" class="input noborder" /></td>
													<td ><input type="text" name="pic_title1[]" class="input" /></td>
												</tr>
											</table>
										</div>

										<div id='attr2'>
											<table class='table2 hd-form'>
												<tr>
													<td width="20"><span class='hand' onclick='add_pic(this)'>[+]</span></td>
													<td width="50"><input type="file" name="img2[]" class="input noborder" /></td>
													<td ><input type="text" name="pic_title2[]]" class="input" /></td>
													
												</tr>
											</table>
										</div>
									</div> -->

							</div>
						
							


						</if>
					</div>
				</div>
			</div>
		</div>
		<div class="position-bottom">
			<input type="submit" class='hd-success' value="添加" />
			<input type="button" class="hd-cancel" onclick="location.href='{:U('Article/index',array('cid'=>$_GET['cid']))}'" value="返回"/>	
		</div>
		
	</form>
	
	
</body>
</html>